package model

import (
	"duoke/tables"
)

type CourseListRsp struct {
	Menu  *[]tables.CourseMenu `json:"menu"`
	List  *[]tables.CourseList `json:"list"`
	Total int64                `json:"total"`
}
type CourseListReq struct {
	PageSize     int   `json:"pageSize"`
	PageNo       int   `json:"pageNo"`
	Ids          []int `json:"ids"`
	Id           int   `json:"id"`
	InstructorId int   `json:"instructor_id"`
}
type CourseInfo struct {
	Id               int     `xorm:"" json:"id" form:"id" mapstructure:"id"`
	Price            float32 `xorm:"" json:"price" form:"price" mapstructure:"price"`
	Title            string  `xorm:"" json:"title" form:"title" mapstructure:"title"`
	ExpirationDate   int64   `xorm:"" json:"expiration_date" form:"expiration_date" mapstructure:"expiration_date"`
	ClassHour        int     `xorm:"" json:"class_hour" form:"class_hour" mapstructure:"class_hour"`
	NumberOfLearners int     `xorm:"" json:"number_of_learners" form:"number_of_learners" mapstructure:"number_of_learners"`
	State            int     `xorm:"" json:"state" form:"state" mapstructure:"state"`
	AboutInstructor  string  `xorm:"" json:"about_instructor" form:"about_instructor" mapstructure:"about_instructor"`
	InstructorId     int     `xorm:"" json:"instructor_id" form:"instructor_id" mapstructure:"instructor_id"`
	Collect          int     `xorm:"" json:"collect" form:"collect" mapstructure:"collect"`
	Shares           int     `xorm:"" json:"shares" form:"shares" mapstructure:"shares"`
	Buy              int     `xorm:"" json:"buy" form:"buy" mapstructure:"buy"`
	Acid             int     `xorm:"" json:"acid" form:"acid" mapstructure:"acid"`
	MenuId           int     `xorm:"" json:"menu_id" form:"menu_id" mapstructure:"menu_id"`
	SubMchId         string  `xorm:"" json:"sub_mch_id" form:"sub_mch_id" mapstructure:"sub_mch_id"`
	IsPoints         int     `xorm:"" json:"is_points" form:"is_points"`
	GivePoints       float64 `xorm:"" json:"give_points" form:"give_points"`
	WatchPoints      string  `xorm:"" json:"watch_points" form:"watch_points"`
	Pic              string  `xorm:"" json:"pic" form:"pic" mapstructure:"pic"`
	CarmineId        int     `xorm:"" json:"carmine_id" form:"carmine_id"`
	IsCollect        int     `xorm:"-" json:"is_collect"`
	LecturerName     string  `xorm:"-" json:"lecturer_name"`
	LecturerPic      string  `xorm:"-" json:"lecturer_pic"`
	LecturerCollege  string  `xorm:"-" json:"lecturer_college"`
	IsBuy            int     `xorm:"-" json:"is_buy"`
	IsFeel           int     `json:"is_feel"`
	WhiteList        string  `json:"white_list"`
}
type CourseBuyInfo struct {
	Id        int `json:"id" binding:"required" required_err:"参数缺失【id】"`
	VideoType int `json:"video_type" binding:"required" required_err:"参数缺失【id】"`
}
type CourseBuyRsp struct {
	IsBuy int `json:"is_buy"`
}

func (CourseInfo) TableName() string {
	return "course_list"
}

type CourseJoinOrder struct {
	Price   float64 `json:"price"`
	OrderNo string  `json:"order_no"`
	IsFell  int     `json:"is_fell"`
}

func (CourseJoinOrder) TableName() string {
	return "course_list"
}

type StaticsCourse struct {
	Collect          int `json:"collect"`
	Shares           int `json:"shares"`
	Buy              int `json:"buy"`
	SubMchId         int `json:"sub_mch_id"`
	NumberOfLearners int `json:"number_of_learners"`
}

func (StaticsCourse) TableName() string {
	return "course_list"
}

type StaticsCourseVideo struct {
	Collect          int     `json:"collect"`
	Shares           int     `json:"shares"`
	Buy              int     `json:"buy"`
	SubMchId         string  `json:"sub_mch_id"`
	NumberOfLearners int     `json:"number_of_learners"`
	WatchTime        float64 `json:"watch_time"`
	WatchNumber      int     `json:"watch_number"`
	LecturerName     string  `json:"lecturer_name"`
	LecturerCollege  string  `json:"lecturer_college"`
	LecturerPic      string  `json:"lecturer_pic"`
}
